\hypertarget{classrapidxml_1_1xml__document}{\section{rapidxml\-:\-:xml\-\_\-document$<$ Ch $>$ Class Template Reference}
\label{classrapidxml_1_1xml__document}\index{rapidxml\-::xml\-\_\-document$<$ Ch $>$@{rapidxml\-::xml\-\_\-document$<$ Ch $>$}}
}


{\ttfamily \#include $<$rapidxml.\-hpp$>$}

Inheritance diagram for rapidxml\-:\-:xml\-\_\-document$<$ Ch $>$\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classrapidxml_1_1xml__document}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classrapidxml_1_1xml__document_aae8841b15085ba8f32ff46587ace28f5}{xml\-\_\-document} ()
\begin{DoxyCompactList}\small\item\em Constructs empty X\-M\-L document. \end{DoxyCompactList}\item 
{\footnotesize template$<$int Flags$>$ }\\void \hyperlink{classrapidxml_1_1xml__document_ac6e73ff9ac323bf5a370c38feb03a6b1}{parse} (Ch $\ast$text)
\item 
void \hyperlink{classrapidxml_1_1xml__document_a826929ff54242532198701f19ff5f83f}{clear} ()
\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
\subsubsection*{template$<$class Ch = char$>$class rapidxml\-::xml\-\_\-document$<$ Ch $>$}

This class represents root of the D\-O\-M hierarchy. It is also an \hyperlink{classrapidxml_1_1xml__node}{xml\-\_\-node} and a \hyperlink{classrapidxml_1_1memory__pool}{memory\-\_\-pool} through public inheritance. Use \hyperlink{classrapidxml_1_1xml__document_ac6e73ff9ac323bf5a370c38feb03a6b1}{parse()} function to build a D\-O\-M tree from a zero-\/terminated X\-M\-L text string. \hyperlink{classrapidxml_1_1xml__document_ac6e73ff9ac323bf5a370c38feb03a6b1}{parse()} function allocates memory for nodes and attributes by using functions of \hyperlink{classrapidxml_1_1xml__document}{xml\-\_\-document}, which are inherited from \hyperlink{classrapidxml_1_1memory__pool}{memory\-\_\-pool}. To access root node of the document, use the document itself, as if it was an \hyperlink{classrapidxml_1_1xml__node}{xml\-\_\-node}. 
\begin{DoxyParams}{Parameters}
{\em Ch} & Character type to use. \\
\hline
\end{DoxyParams}


\subsection{Constructor \& Destructor Documentation}
\hypertarget{classrapidxml_1_1xml__document_aae8841b15085ba8f32ff46587ace28f5}{\index{rapidxml\-::xml\-\_\-document@{rapidxml\-::xml\-\_\-document}!xml\-\_\-document@{xml\-\_\-document}}
\index{xml\-\_\-document@{xml\-\_\-document}!rapidxml::xml_document@{rapidxml\-::xml\-\_\-document}}
\subsubsection[{xml\-\_\-document}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Ch  = char$>$ {\bf rapidxml\-::xml\-\_\-document}$<$ Ch $>$\-::{\bf xml\-\_\-document} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classrapidxml_1_1xml__document_aae8841b15085ba8f32ff46587ace28f5}


Constructs empty X\-M\-L document. 



\subsection{Member Function Documentation}
\hypertarget{classrapidxml_1_1xml__document_a826929ff54242532198701f19ff5f83f}{\index{rapidxml\-::xml\-\_\-document@{rapidxml\-::xml\-\_\-document}!clear@{clear}}
\index{clear@{clear}!rapidxml::xml_document@{rapidxml\-::xml\-\_\-document}}
\subsubsection[{clear}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Ch  = char$>$ void {\bf rapidxml\-::xml\-\_\-document}$<$ Ch $>$\-::clear (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classrapidxml_1_1xml__document_a826929ff54242532198701f19ff5f83f}
Clears the document by deleting all nodes and clearing the memory pool. All nodes owned by document pool are destroyed. \hypertarget{classrapidxml_1_1xml__document_ac6e73ff9ac323bf5a370c38feb03a6b1}{\index{rapidxml\-::xml\-\_\-document@{rapidxml\-::xml\-\_\-document}!parse@{parse}}
\index{parse@{parse}!rapidxml::xml_document@{rapidxml\-::xml\-\_\-document}}
\subsubsection[{parse}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Ch  = char$>$ template$<$int Flags$>$ void {\bf rapidxml\-::xml\-\_\-document}$<$ Ch $>$\-::parse (
\begin{DoxyParamCaption}
\item[{Ch $\ast$}]{text}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classrapidxml_1_1xml__document_ac6e73ff9ac323bf5a370c38feb03a6b1}
Parses zero-\/terminated X\-M\-L string according to given flags. Passed string will be modified by the parser, unless \hyperlink{namespacerapidxml_a45d4d8fef551beaaba23a83b847fd6a3}{rapidxml\-::parse\-\_\-non\-\_\-destructive} flag is used. The string must persist for the lifetime of the document. In case of error, \hyperlink{classrapidxml_1_1parse__error}{rapidxml\-::parse\-\_\-error} exception will be thrown. \par
\par
 If you want to parse contents of a file, you must first load the file into the memory, and pass pointer to its beginning. Make sure that data is zero-\/terminated. \par
\par
 \hyperlink{class_document}{Document} can be parsed into multiple times. Each new call to parse removes previous nodes and attributes (if any), but does not clear memory pool. 
\begin{DoxyParams}{Parameters}
{\em text} & X\-M\-L data to parse; pointer is non-\/const to denote fact that this data may be modified by the parser. \\
\hline
\end{DoxyParams}


The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
C\-:/\-Users/\-Christopher/\-Documents/\-Net\-Beans\-Projects/pbsearch/\-Search\-Engine/\hyperlink{rapidxml_8hpp}{rapidxml.\-hpp}\end{DoxyCompactItemize}
